#include "stdafx.h"
#include "Aircraft.h"
#include "Schedule.h"
#include "AircraftType.h"

using namespace std;

Aircraft::Aircraft(void){
	//create a null aircraft
	aircraftID = -1;
}

/*------------------------------------------------------------
/ Aircraft
/ Description: alternate constructor 
/ Parameters:
/	_aircraftID: unique identifer for aircraft
/	_aircraftType: 
/	_schedule: 
/	_currentLocation: Gate or LongTermStand the aircraft is located at
/	_airline: airline to which aircraft belongs
/ Return: N/A
------------------------------------------------------------*/
Aircraft::Aircraft(int _aircraftID, AircraftType *_aircraftType, Schedule* _schedule, string _currentLocation, string _airline){

	//initializes each aircraft attribute
	
	aircraftID = _aircraftID;
	aircraftType = _aircraftType;
	schedule = _schedule;
	currentLocation = _currentLocation;
	airline = _airline;
	
}

/*------------------------------------------------------------
/ ~Aircraft
/ Description: default destructor 
/ Parameters: N/A
/ Return: N/A
------------------------------------------------------------*/
Aircraft::~Aircraft(void){
}

/*------------------------------------------------------------
/ getAircraftID
/ By: Mark Freedman
/ Date: February 26 2011
/ Description: returns the aircraft's identifier
/ Paramneters: N/A
/ Return: int: aircraft Identifier
------------------------------------------------------------*/
int Aircraft::getAircraftID(){
	return aircraftID;
}

/*------------------------------------------------------------
/ getAircraftType
/ By: Mark Freedman
/ Date: February 26 2011
/ Description: returns the aircraft's type
/ Paramneters: N/A
/ Return: string: aircraft type
------------------------------------------------------------*/
AircraftType* Aircraft::getAircraftType(){
	return aircraftType;
}

/*------------------------------------------------------------
/ getCurrentLocation
/ By: Mark Freedman
/ Date: February 26 2011
/ Description: returns the aircraft's current location 
/ Paramneters: N/A
/ Return: string: aircraft location
------------------------------------------------------------*/
string Aircraft::getCurrentLocation(){
	return currentLocation;
}

/*------------------------------------------------------------
/ getAirline
/ By: Mark Freedman
/ Date: February 26 2011
/ Description: returns the aircraft's airline
/ Paramneters: N/A
/ Return: string: the airline this aircraft belongs to
------------------------------------------------------------*/
string Aircraft::getAirline(){
	return airline;
}

/*------------------------------------------------------------
/ setCurrentLocation
/ By: Mark Freedman
/ Date: February 26 2011
/ Description: modifies the aircraft's current location
/ Paramneters: string: current location of aircraft
/ Return: N/A
------------------------------------------------------------*/
void Aircraft::setCurrentLocation(string location){
	currentLocation = location;
}

/*------------------------------------------------------------
/ setAirline
/ By: Mark Freedman
/ Date: February 26 2011
/ Description: modifies the aircraft's airline
/ Paramneters: string: new airline to which the aircraft belongs
/ Return: N/A 
------------------------------------------------------------*/
void Aircraft::setAirline(string _airline){
	airline = _airline;
}

/*------------------------------------------------------------
/ getNextFlight
/ By: Mark Freedman
/ Date: February 26 2011
/ Description: returns the next upcoming flight for the aircraft
/ Paramneters: N/A
/ Return: The next flight
------------------------------------------------------------*/
Flight* Aircraft::getNextFlight (){
	return nextFlight;
}

/*------------------------------------------------------------
/ setNextFlight
/ By: Mark Freedman
/ Date: February 26 2011
/ Description: sets the next flight for the aircraft
/ Paramneters: The flight to assign
/ Return: N/A
------------------------------------------------------------*/
void Aircraft::setNextFlight (Flight* f){
	nextFlight = f;
}

/*------------------------------------------------------------
/ checkStandCompatibility
/ By: Mark Freedman
/ Date: February 26 2011
/ Description: checks if the aircraft can use the stand
/ Paramneters: The stand
/ Return: success or failure
------------------------------------------------------------*/
int Aircraft::checkStandCompatibility(Stand *s){

	//CODE THE COMPATIBILITY CHECK

	return 0;
}

/*------------------------------------------------------------
/ getCurrentStand
/ By: Mark Freedman
/ Date: February 26 2011
/ Description: returns the current stand for the aircraft
/ Paramneters: N/A
/ Return: The Stand
------------------------------------------------------------*/
Stand* Aircraft::getCurrentStand (){
	return currentStand;
}

/*------------------------------------------------------------
/ setCurrentStand
/ By: Mark Freedman
/ Date: February 26 2011
/ Description: sets the current stand for the aircraft
/ Paramneters: The flight to assign
/ Return: N/A
------------------------------------------------------------*/
void Aircraft::setCurrentStand (Stand* st){
	currentStand = st;
}

/*------------------------------------------------------------
/ getSchedule
/ By: Randy Wiebe
/ Date: March 24 2011
/ Description: returns pointer to Aircraft's Schedule
/ Paramneters: N/A
/ Return: pointer to Schedule
------------------------------------------------------------*/
Schedule* Aircraft::getSchedule (){
	return schedule;
}